<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <button v-on:click="onClick">点我点我</button>
    </div>

    <script src="../vue.js"></script>
    <script>
      var app = new Vue({
        el: '#app',
        // 定义方法的地方
        methods: {
          onClick() {
            console.log('触发了点击事件');
          },
        },
      });
    </script>
  </body>
</html>
